using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace RiceShop.Models
{
    /// <summary>
    /// 收货地址实体类
    /// </summary>
    [Table("Address")]
    public class Address 
    {
        /// <summary>
        /// 地址ID
        /// </summary>
        [Key]
        public long Id { get; set; }

        /// <summary>
        /// 用户ID
        /// </summary>
        public long UserId { get; set; }

        /// <summary>
        /// 收货人姓名
        /// </summary>
        [Required]
        [StringLength(20)]
        public string ReceiverName { get; set; } = string.Empty;

        /// <summary>
        /// 收货人电话
        /// </summary>
        [Required]
        [StringLength(20)]
        public string PhoneNumber { get; set; } = string.Empty;

        /// <summary>
        /// 省份
        /// </summary>
        [Required]
        [StringLength(20)]
        public string Province { get; set; } = string.Empty;

        /// <summary>
        /// 城市
        /// </summary>
        [Required]
        [StringLength(20)]
        public string City { get; set; } = string.Empty;

        /// <summary>
        /// 区县
        /// </summary>
        [Required]
        [StringLength(20)]
        public string District { get; set; } = string.Empty;

        /// <summary>
        /// 详细地址
        /// </summary>
        [Required]
        [StringLength(100)]
        public string DetailAddress { get; set; } = string.Empty;

        /// <summary>
        /// 是否默认地址
        /// </summary>
        public bool IsDefault { get; set; }

        
    }
} 